# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
pkgname=gnome-desktop
pkgver=42.1
pkgrel=0
pkgdesc="GNOME desktop core libraries"
url="https://gitlab.gnome.org/GNOME/gnome-desktop"
arch="all !s390x !riscv64" # s390x, riscv64: gtk4
license="GPL-2.0-or-later AND LGPL-2.1-or-later"
depends_dev="gobject-introspection-dev gsettings-desktop-schemas-dev"
makedepends="$depends_dev
	eudev-dev
	fontconfig-dev
	gdk-pixbuf-dev
	glib-dev
	gtk-doc
	gtk+3.0-dev
	gtk4.0-dev
	iso-codes-dev
	itstool
	libseccomp-dev
	libxml2-utils
	meson
	xkeyboard-config-dev
	"
depends="bubblewrap musl-locales"
options="!check" # Can't find its own GSettings schemas
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang $pkgname-dbg"
source="https://download.gnome.org/sources/gnome-desktop/${pkgver%.*}/gnome-desktop-$pkgver.tar.xz
	"

build() {
	abuild-meson \
		-Dgnome_distributor="Alpine Linux" \
		-Dudev=enabled \
		-Dbuild_gtk4=true \
		-Dlegacy_library=true \
		. output
	meson compile ${JOBS:+-j ${JOBS}} -C output
}

check() {
	meson test --no-rebuild -v -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}
sha512sums="
a084f705aedf2d159da91dc54f38261760a50e51041321e6a69ee0dff499e11f0a440f5a9582a31977b0270c87e3ba7de0f5c9cc182c0631858afa1d9508ecf4  gnome-desktop-42.1.tar.xz
"
